import request from "./request.js"
import {uploadFile} from "./request.js"

//登录接口
export const miniapp = (data) => {
    return request({
        url: 'api/user/miniapp',
        method: 'post',
		data:data
    })
}

// 用户信息
export const userinfo = (data) => {
    return request({
        url: 'api/index/userinfo',
        method: 'post',
		data:data,
		hideLoading:true
    })
}

// 修改用户信息
export const edituserinfo = (data) => {
    return request({
        url: 'api/index/edituserinfo',
        method: 'post',
		data:data,
    })
}

// 修改用户头像
export const avatar = (filePath) => {
    return uploadFile({
        url: 'api/index/avatar',
        filePath: filePath
    })
}

// 修改手机号
export const setphone = (data) => {
    return request({
        url: 'api/index/setphone',
        method: 'post',
        data:data,
    })
}